package com.dao.job.pa.support;

import java.io.Serializable;
import java.util.List;

import com.dao.job.pa.IPAMenuDao;
import com.dao.spring.BaseDao;
import com.pojo.job.pa.PAMenu;

public class PAMenuDao extends BaseDao implements IPAMenuDao {

	@SuppressWarnings("unchecked")
	public List<PAMenu> findPAMenuByType(Integer type) {
		return super.getHibernateTemplate().find("from PAMenu pm where pm.TYPE="+type+"");
	}

	@SuppressWarnings("unchecked")
	public List<Integer> findTypeGorupByType() {
		return super.getHibernateTemplate().find("select max(pm.TYPE) from PAMenu pm group by pm.TYPE");
	}

	public PAMenu get(Serializable ID) {
		return super.getHibernateTemplate().get(PAMenu.class, ID);
	}

	
}
